package com.servicecloud.myrule;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;

/**
 * 作用：<br>
 * 自定义负载均衡配置类<br>
 * note:该类不能被ComponentScan扫描到
 * 
 * @author Gavin<br>
 */
@Configuration
public class MySelfRule {
	@Bean
	public IRule myRule() {
		return new RandomRule();//采用随机负载算法
	}
}
